module.exports=(req,res,next)=>{
    const {
        adminName,
        password,
    } = req.body
    const userReg = /^[a-zA-z][0-9a-zA-Z_]{3,5}$/g;
    const passwordReg = /^[0-9]{5,6}$/g;
    if(!userReg.test(adminName)){
        return res.send({
            code: 10003,
            msg: "管理员名称错误,(开头为大小写字母,共3-5个字符)",
            data: null
        })
    }
    if(!passwordReg.test(password)){
        return res.send({
            code: 10004,
            msg: "密码格式错误,(5-6个纯数字)",
            data: null
        })
    }
    next()
}